// my_main.h

#ifndef MY_MAIN_H
#define MY_MAIN_H

// Optional use of hardware (comment or uncomment as desired)

// display LEDs

#define USE_LEDS

// Analog to digital input pins

#define A2D_MASK 0x3			// bit #s = a/d ports, eg 3 = AN0 and AN1

// USB settings 

#define USE_USB 				// enable USB
#define USE_USB_PRINTF			// use USB fort printf output

// UART (comment or uncomment as desired)

#define USE_UART

// Ultrasonic (comment or uncomment as desired)
// This uses timer T1 thru delayT1_ms()

#define USE_ULTRASONIC

// I2C (comment or uncomment as desired)

//#define USE_I2C

// Free-running clock for elapsed time (uses timer T0 and frreclk interrupt)
  
#define USE_FREECLK  

// delay-timers; must not conflict with other time usage

#define USE_DELAY_TIMER1
//#define USE_DELAY_TIMER2		
//#define USE_DELAY_TIMER3
//#define USE_DELAY_TIMER4
//#define USE_DELAY_TIMER5
//#define USE_COMBINED_TIMER23		
//#define USE_COMBINED_TIMER45		

// Maxim 541 D/A chip

//#define USE_MAX541

// PWM or Vex Motor OC assignment
// use one or other for given OCx; OC ports do not have to match PWM/MOTOR

//#define PWM1	1
//#define PWM2	2
//#define PWM3	3
//#define PWM4	4
//#define PWM5	5

#define VEX_MOTOR1	1
#define VEX_MOTOR2	4
//#define VEX_MOTOR3	3
//#define VEX_MOTOR4	2
//#define VEX_MOTOR5	5

// combined timers for time elapsed functions
// DO NOT EDIT BELOW 

// define PRINTF to output to usb or uart
#ifdef USE_USB_PRINTF
	#define PRINTF		lib_usb_cdc_printf_blocked	// output to usb
#else
	#define PRINTF		printf						// output to uart (default)
#endif

void my_main(void);
void checkrc(int rc);
void ledOut(UINT16 value);

#endif
